﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using KL.UFrame.Core.Result;
using KL.UFrame.Data.Entities;
using KL.UFrame.Data.Models;

namespace KL.UFrame.Data.Business
{
    public interface ITrainningBusiness
    {
        Task<int> CreateCategoryAsync(TrainningCategoryModel model);

        Task<int> UpdateCategoryAsync(TrainningCategoryModel model);

        Task<bool> DeleteCategoryAsync(int id);

        Task<bool> ResumeCategoryAsync(int id);

        Task<TrainningCategoryModel> GetCategoryAsync(int id);

        Task<ResultMessage<List<TrainningCategoryModel>>> GetAllCategoriesAsync(bool onlyEnabled = true);

        Task<int> CreateTrainningAsync(TrainningModel model);

        Task<int> UpdateTrainningAsync(TrainningModel model);

        Task<bool> DeleteTrainningAsync(int id);

        Task<bool> ResumeTrainningAsync(int id);

        Task<ResultMessage<List<TrainningModel>>> GetAllTrainningsAsync(int categoryId, bool onlyEnabled = true);

        Task<TrainningModel> GetTrainningAsync(int id);

        Task<int> CreateEnrollAsync(EnrollModel model);

        Task<object>  GetCategoryiesWithTrainnings();

        Task<ResultMessage<List<EnrollModel>>> SearchEnrollsAsync(int trainningId,string phone, DateTime start, DateTime end,
            int pageIndex, int pageSize);

        Task<List<EnrollSummaryModel>> GetEnrollsAsync(string phone, string idCard, DateTime start, DateTime end);
        Task<bool> AuditAsync(int enrollId, EnrollStatus statusId, string description);
    }
}